/*import java.util.List;

import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

public class InteractiveArrayAdapter extends ArrayAdapter<Model> {
String tag = "Events";
private final List<Model> list;
private final Activity context;

public InteractiveArrayAdapter(Activity context, List<Model> list) {
    super(context, R.layout.rowbuttonlayout, list);
    this.context = context.getApplicationContext();
    this.list = list;
}

static class ViewHolder {
    protected TextView text;
    protected CheckBox checkbox,checkbox1;
    protected RadioGroup mgroup;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    Log.d(tag," 3");
    View view = convertView;
    ViewHolder viewHolder = null;
    final RadioButton[] mbutton = null;
    if (view == null) {
        LayoutInflater inflator = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        view = inflator.inflate(R.layout.rowbuttonlayout, null);
        viewHolder = new ViewHolder();
        viewHolder.text = (TextView) view.findViewById(R.id.label);
        //viewHolder.checkbox = (CheckBox) view.findViewById(R.id.check);
        //viewHolder.checkbox1 = (CheckBox) view.findViewById(R.id.checkbox1);
        viewHolder.mgroup = (RadioGroup) view.findViewById(R.id.radioGroup1);

        // I'm not sure about this..
        // Begin
        mbutton=new RadioButton[5];
       for(int l=0;l<5;l++){
           mbutton[l]=new RadioButton(context);
           mbutton[l].setText("test"+l);


           viewHolder.mgroup.addView(mbutton[l]);

        }

           viewHolder.mgroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
               public void onCheckedChanged(RadioGroup mRadioGroup, int checkedId) {
                    for(int i=0; i<mRadioGroup.getChildCount(); i++) {
                         RadioButton btn = (RadioButton) mRadioGroup.getChildAt(i);
                         //int t=table.indexOfChild(table_row);
                         //System.out.println(t);
                         int t=mRadioGroup.getId();
                         System.out.println(t);

                         if(btn.getId() == checkedId) {
                              String text = btn.getText().toString();
                              // do something with text
                              Log.d(text," event1");
                              return;
                         }
                    }
               }
          });
         // End 

        view.setTag(viewHolder);
        Log.d(tag,"me");

    } else {
        viewHolder = (ViewHolder) convertView.getTag();

        // Begin
        mbutton = viewHolder.mgroup;
        // End

        Log.d(tag,"meeee");

    }
    ViewHolder holder = (ViewHolder) view.getTag();
    holder.text.setText(list.get(position).getName());

    Log.d(tag," event7");

    return view;

}*/